#!/usr/bin/env python
# cancella dall'albero DST tutti i file che non sono presenti in SRC
import os

SRC = '/home/jonathan/Desktop/matteo'
DST = '/mnt/data/Backup/matteo'

for dirpath, dirnames, filenames in os.walk(DST):
    print dirpath
    for filename in filenames:
        dstname = os.path.join(dirpath,filename)
        srcname = dstname.replace(DST,SRC)
        if not os.path.exists(srcname):
            print '* Removing %s...' % dstname
            os.remove(dstname)
